package com.windowes.weichang.controller.platform;

import com.windowes.weichang.common.ServerResponse;
import com.windowes.weichang.dto.DeptIdParamDTO;
import com.windowes.weichang.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/***
 *
 * @author: yangqing
 * @email: qing.yang@bangdao-tech.com
 * @createTime: 2018/7/29 下午10:33
 * @description:
 *
 **/
@RestController
@RequestMapping("dept")
public class DeptController {


    @Autowired
    DeptService deptService;

    @PostMapping("getDeptId")
    public ServerResponse getDeptId(@RequestBody DeptIdParamDTO deptIdParamDTO) {
        return deptService.getDeptId(deptIdParamDTO);
    }


    @GetMapping("list")
    public ServerResponse list(){
        return deptService.list();
    }

}
